﻿namespace Yom.Common
{
    using System.Collections;
    using Newtonsoft.Json;
    using Newtonsoft.Json.Converters;

    public class JsonModel : Hashtable
    {
        public JsonModel() { }
    }

    public class Json
    {
        private JsonModel _Json;

        public Json()
        {
            this._Json = new JsonModel();
        }

        public Json(JsonModel js)
        {
            this._Json = js;
        }

        public void Set(object Key, object Val)
        {
            this._Json.Add(Key, Val);
        }

        public void Clear()
        {
            this._Json.Clear();
        }

        public override string ToString()
        {
            return JsonConvert.SerializeObject(this._Json);
        }
    }
}